Contract

data class Contract<Input, Activity : Activity>(val activityClass: KClass<Activity>, val input: Input, val provideResultLauncher: Activity.() -> ActivityResultLauncher<Input>) : NavigationSpec

Navigates using an ActivityResultLauncher

Parameters

Input

the type of input to provide to the ActivityResultLauncher

Activity

the type of android.app.Activity to provide the ActivityResultLauncher

activityClass

The KClass of the Activity to generate the ActivityResultLauncher for

input

the Input to provide to the ActivityResultLauncher

provideResultLauncher

A callback method called on an instance of activityClass to provide an ActivityResultLauncher to launch with input. Note that this method may be called after the instance of activityClass has been created.

Constructors

Link copied to clipboard
constructor(activityClass: KClass<Activity>, input: Input, provideResultLauncher: Activity.() -> ActivityResultLauncher<Input>)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun tryAndLaunch(activity: Activity): Unit?